package com.entity;

import com.util.VeDate;
import com.alibaba.fastjson.JSONObject;

// 商户表的实体类
public class Seller {
	private String sellerid = "S"+VeDate.getStringId(); // 生成主键编号
	private String username; // 用户名
	private String password; // 密码
	private String sellername; // 店铺名称
	private String contact; // 联系方式
	private String address; // 联系地址
	private String status; // 状态
	private String regdate; // 注册日期
	public String getSellerid() {
		return this.sellerid;
	}

	public void setSellerid(String sellerid) {
		this.sellerid = sellerid;
	}

	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSellername() {
		return this.sellername;
	}

	public void setSellername(String sellername) {
		this.sellername = sellername;
	}

	public String getContact() {
		return this.contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getAddress() {
		return this.address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getRegdate() {
		return this.regdate;
	}

	public void setRegdate(String regdate) {
		this.regdate = regdate;
	}


	// 重载方法 生成JSON类型字符串 
	@Override
	public String toString() {
		return this.toJsonString();
	}

	//直接转换成JSON字符串
	private String toJsonString() {
		JSONObject jsonString = new JSONObject();
		jsonString.put("sellerid", this.sellerid); // 主键编号
		jsonString.put("username", this.username); // 用户名
		jsonString.put("password", this.password); // 密码
		jsonString.put("sellername", this.sellername); // 店铺名称
		jsonString.put("contact", this.contact); // 联系方式
		jsonString.put("address", this.address); // 联系地址
		jsonString.put("status", this.status); // 状态
		jsonString.put("regdate", this.regdate); // 注册日期
		return jsonString.toString();
	}




}




